<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>订单详情</title>
		<meta name="viewport"
			content="width=device-width,height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta name="renderer" content="webkit" />
		<meta name="aplus-xplug" content="NONE">
		<link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="/static/iconfont/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="/static/layui/css/modules/admin/default/admin.css" />
		<link rel="stylesheet" type="text/css" href="/static/css/new_layui.css" />
		<link rel="stylesheet" type="text/css" href="/static/css/default.css" />
		<script type="text/javascript" charset="utf-8" src="/static/layui/layui.js"></script>
		<script type="text/javascript" charset="utf-8" src="/static/js/index.js"></script>
		<style>
			#shopping_list {
				color: #3c3c3c;
			}

			#shopping_list .layui-form-radio {
				padding-left: 20px;
				display: block;
			}

			#shopping_list .layui-form-radioed {
				border: 1px solid #119fff;
				background-color: #D9EDF7;
				margin: 5px 0 7px;
				-webkit-box-shadow: 5px 5px 0 #f3f3f3;
				box-shadow: 5px 5px 0 #f3f3f3;

			}

			#shopping_list .layui-form-radioed div {
				font-size: 16px;
				font-weight: bold;
				line-height: 36px;
			}

			#shopping_list .phone {
				font-weight: 700;
				font-size: 16px;
				color: grey;
			}

			#shopping_list .edit_shopping {
				padding-left: 10px;
				font-weight: normal;
				color: #ff6600;
				display: inline;
			}

			.express_no {
				color: #0077CF;
			}

			.express_time {
				font-size: 12px;
				color: #808080;
			}

			.layui-field-box .layui-form-item {
				margin-bottom: 0px;
			}

			.invoice-link {
				background: #2F4056;
				padding: 4px 10px;
				border-radius: 3px;
				font-style: italic;
				vertical-align: middle;
			}
		</style>
	</head>

	<body class="default">
		<div style="margin: 30px 20px;">

			<form class="layui-form" lay-filter="tpl_order" action="{:url('order/saveData')}">
				<div class="layui-form-item">
					<label class="layui-form-label"></label>
					<div class="layui-input-block">
						<ul class="layui-timeline layui-timeline-plane">
							<li class="layui-timeline-item {if condition=" $data['order_state'] EQ 1"}half{elseif
								condition="$data['order_state'] GT 1" /} over{/if}">
								<i class="layui-icon layui-timeline-axis layui-icon-radio"></i>
								<div class="layui-timeline-content layui-text">
							  <h3 class="layui-timeline-title"><span>下单</span></h3>
									<p>{$data.create_time}</p>
								</div>
							</li>
							<li class="layui-timeline-item {if condition=" $data['order_state'] EQ 2"}half{elseif
								condition="$data['order_state'] GT 2" /} over{/if}">
								<i class="layui-icon layui-timeline-axis layui-icon-circle {if condition="
									$data['order_state'] EGT 2"}layui-icon-radio{/if}"></i>
								<div class="layui-timeline-content layui-text">
							  <h3 class="layui-timeline-title"><span>确认订单</span></h3>
									<p>{$data.confirm_time}</p>
								</div>
							</li>
							<li class="layui-timeline-item {if condition=" $data['order_state'] EQ 3"}half{elseif
								condition="$data['order_state'] GT 3" /} over{/if}">
								<i class="layui-icon layui-timeline-axis layui-icon-circle {if condition="
									$data['order_state'] EGT 3"}layui-icon-radio{/if}"></i>
								<div class="layui-timeline-content layui-text">
									<h3 class="layui-timeline-title"><span>发货</span></h3>
							  <p>{$data.shopping_time}</p>
								</div>
							</li>
							<li class="layui-timeline-item {if condition=" $data['order_state'] EQ 4"}half{elseif
								condition="$data['order_state'] GT 4" /} over{/if}">
								<i class="layui-icon layui-timeline-axis layui-icon-circle {if condition="
									$data['order_state'] EGT 4"}layui-icon-radio{/if}"></i>
								<div class="layui-timeline-content layui-text">
									<h3 class="layui-timeline-title"><span>收货</span></h3>
									<p>{$data.receipt_time}</p>
								</div>
							</li>
							<li class="layui-timeline-item {if condition=" $data['order_state'] EQ 5"}over{/if}">
								<i class="layui-icon layui-timeline-axis layui-icon-circle {if condition="
									$data['order_state'] EGT 5"}layui-icon-radio{/if}"></i>
								<div class="layui-timeline-content layui-text">
									<h3 class="layui-timeline-title"><span>完成</span></h3>
									<p>{$data.over_time}</p>
								</div>
							</li>
						</ul>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">订单号</label>
					<div class="layui-input-inline">
						<span style="font-size: 16px; color: #ff6600; line-height: 38px;">{$data.out_order_no}</span>
					</div>
				</div>
				<div class="layui-form-item" style="display: none;">
					<label class="layui-form-label">下单时间</label>
					<div class="layui-input-inline">
						<span style="font-size: 16px; color: #ff6600; line-height: 38px;">{$data.create_time}</span>
					</div>
				</div>
				<div class="layui-form-item" style="display: none;">
					<label class="layui-form-label">下单会员</label>
					<div class="layui-input-inline">
						<input type="hidden" name="member_id" lay-verify="required"
							value="{$data.member_info.member_id}" />
						<span
							style="font-size: 16px; color: #ff6600; line-height: 38px;">{$data.member_info.username}</span>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">优士发票编号</label>
					<div class="layui-input-inline">
						<span style="font-size: 16px; color: #ff6600; line-height: 38px;">{$data.invoice_duty}</span>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">供应商发票编号</label>
					<div class="layui-input-inline">
						<span style="font-size: 16px; color: #ff6600; line-height: 38px;">{$data.caigou_invoice_duty}</span>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">收货地址</label>
					<div class="layui-input-block">
						<blockquote class="layui-elem-quote layui-quote-nm">
							<div id="shopping_list">
								<div><input type="radio" value="{$data.shopping_info.shopping_id}" checked=""
										name="shopping_id" lay-skin="primary"
										title="{$data.shopping_info.province_name} {$data.shopping_info.city_name} {$data.shopping_info.area_name} {$data.shopping_info.street} （{$data.shopping_info.contacts} 收）<span class=phone>{$data.shopping_info.phone}</span><span class=edit_shopping>修改</span>" />
								</div>
							</div>
						</blockquote>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">订单商品</label>
					<div class="layui-input-block">
						<input type="hidden" name="goods_skus" value="{$data.cart_info.cart_ids}" />
						<table class="layui-hide" id="goods_list" lay-filter="goods_list"></table>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">订单金额</label>
					<div class="layui-input-inline text-price">
						{$data.order_money}
					</div>
					<div class="layui-input-inline">
						{if condition="$data['shoukuan_time']"}
						收款倒计时：{$data.shoukuan_time}
						{/if}
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">折扣后金额</label>
					<div class="layui-input-inline text-price" id="order_price_rate">
						{$data.supplier_rate_money}
					</div>
				</div>
				{if condition="$data['order_state'] GT 2"}
				<div class="layui-form-item">
					<label class="layui-form-label">配送信息</label>
					<div class="layui-input-block express-info">
						{volist name="express_list" id="list"}
						<fieldset class="layui-elem-field {$list.receipt_state==1?'wait':'over'}">
							<legend>{if condition="$list['is_exchange'] EQ 2"}<span
									style="color:#ff6600">【换货】</span>{/if}{$list.express_name}（<span
									class="express_no">{$list.express_no}</span>）<span
									class="express_time">发货时间：{$list.create_time}</span></legend>
							<div class="layui-field-box">
								{volist name="list['cart_list']" id="vo"}
								<input type="radio" name="express_redio{$list.express_id}_{$vo.cart_id}" checked=""
									value="{$vo.cart_id}" title="{$vo.goods_name}（{$vo.goods_sku}）（数量：{$vo.goods_num}）">
								{/volist}
								{if condition="$list['receipt_state'] EQ 1"}
								<button type="button" data-id="{$list.express_id}"
									class="layui-btn layui-btn-normal layui-btn-sm"
									lay-filter="submit_receipt" style="display: none;">确认收货</button>
								{else /}
								<div style="color: #ff6600;">收货时间：{$list.receipt_time}</div>
								{/if}
							</div>
						</fieldset>
						{/volist}
					</div>
				</div>
				{/if}
				{if condition="isset($is_install) and count($is_install) GT 0"}
				<div class="layui-form-item">
					<label class="layui-form-label">安装服务</label>
					<div class="layui-input-block install-info">
						{volist name="is_install" id="list"}
						<fieldset class="layui-elem-field over">
							<legend>{$list.goods_info.goods_name}（<span class="express_no">{$list.goods_sku}</span>）
							</legend>
							<div class="layui-field-box">
								<ul class="layui-timeline layui-timeline-plane layui-timeline-plane3">
									<li class="layui-timeline-item {if condition=" $list['install_info']['step'] EQ 1"}half{elseif condition="$list['install_info']['step'] GT 1" /} over{/if}">
										<i class="layui-icon layui-timeline-axis layui-icon-circle {if condition="
											$list['install_info']['step'] GT 0"}layui-icon-radio{/if}"></i>
										<div class="layui-timeline-content layui-text">
											<h3 class="layui-timeline-title"><span>申请安装</span></h3>
											{if condition="$list['install_info']['step'] EQ 0"}
											<button type="button" data-cart_id="{$list.cart_id}"
												class="layui-btn layui-btn-normal layui-btn-sm"
												lay-filter="submit_install_info">录入安装信息</button>
											{else /}
											<p>安装地点：{$list['install_info']['option_json']['install_addr']}</p>
											<p>安装时间：{$list['install_info']['option_json']['install_time']}</p>
											<p>　联系人：{$list['install_info']['option_json']['contact_man']}</p>
											<p>联系方式：{$list['install_info']['option_json']['contact_phone']}</p>
											<p>录入时间：{$list['install_info']['option_json']['step_1_time']|date='Y-m-d
												H:i',###}</p>
											{/if}
										</div>
									</li>
									<li class="layui-timeline-item {if condition=" $list['install_info']['step'] EQ 2"}half{elseif condition="$list['install_info']['step'] GT 2" /} over{/if}">
										<i class="layui-icon layui-timeline-axis layui-icon-circle {if condition="
											$list['install_info']['step'] GT 1"}layui-icon-radio{/if}"></i>
										<div class="layui-timeline-content layui-text">
											<h3 class="layui-timeline-title"><span>指派安装工程师</span></h3>
											{if condition="$list['install_info']['step'] EQ 1"}
											<button type="button" data-cart_id="{$list.cart_id}"
												class="layui-btn layui-btn-normal layui-btn-sm"
												lay-filter="submit_engireer_info">指派工程师</button>
											{elseif condition="$list['install_info']['step'] EQ 0" /}

											{else /}
											<p>　工程师：{$list['install_info']['option_json']['engineer']}</p>
											<p>联系电话：{$list['install_info']['option_json']['engineer_phone']}</p>
											<p>录入时间：{$list['install_info']['option_json']['step_2_time']|date='Y-m-d
												H:i',###}</p>
											{/if}
										</div>
									</li>
									<li class="layui-timeline-item {if condition=" $list['install_info']['step'] EQ 3"
										/} over{/if}">
										<i class="layui-icon layui-timeline-axis layui-icon-circle {if condition="
											$list['install_info']['step'] EQ 3"}layui-icon-radio{/if}"></i>
										<div class="layui-timeline-content layui-text">
											<h3 class="layui-timeline-title"><span>安装完成</span></h3>
											{if condition="$list['install_info']['step'] EQ 2"}
											<button type="button" data-cart_id="{$list.cart_id}"
												class="layui-btn layui-btn-normal layui-btn-sm"
												lay-filter="submit_over_info">安装完成</button>
											{elseif condition="$list['install_info']['step'] LT 2" /}

											{else /}
											<p>完成时间：{$list['install_info']['option_json']['step_3_time']|date='Y-m-d
												H:i',###}</p>
											{/if}
								 	</div>
									</li>
								</ul>
							</div>
						</fieldset>
						{/volist}
					</div>
				</div>
				{/if}
				<div class="layui-form-item" id="invoice_info">
					<label class="layui-form-label">开票信息</label>
					<div class="layui-input-block">
						<blockquote class="layui-elem-quote layui-quote-nm">
							<div class="layui-form-item">
								<label class="layui-form-label">汇款单位</label>
								<div class="layui-input-inline">
									<input type="text" name="huikuandanwei" id="huikuandanwei" value="{$data.huikuandanwei}"
										lay-verify="required" class="layui-input" />
								</div>
							</div>
							{if condition="$data['invoice_state'] NEQ 1"}
							{volist name="data['invoice_info_list']" id="list"}
							<div class="layui-form-item">
								<div class="layui-input-block" style="margin-left: 0;">
									{if condition="$list['invoice_type'] EQ 1"}
									<input type="radio" name="invoice_type"  readonly="" value="1" checked="" title="【普通发票】{$list.invoice_title}（税号：{$list.invoice_duty}，发票金额：{$list.invoice_money}）">
									{/if}
									{if condition="$list['invoice_type'] EQ 3"}
							 		<input type="radio" name="invoice_type" readonly="" value="3" checked="" title="【增值税发票】{$list.invoice_title}（税号：{$list.invoice_duty}，发票金额：{$list.invoice_money}）">
							 		{/if}
							 		{if condition="$list['invoice_proof'] NEQ ''"}
							 		<span class="invoice-link">
							 		<a href="{$list['invoice_proof']['save_path']}" style="color: #ffffff;" title="{$list.invoice_proof.file_name}" target="_blank"><i class="layui-icon layui-icon-link"></i>{$list.invoice_proof.file_name}</a>
							 		</span>
							 		{/if}
								</div>
							</div>
							{/volist}
							{/if}
						</blockquote>
					</div>
				</div>
				<div class="layui-form-item">
					<div>
						<label class="layui-form-label">发票信息</label>
						<div class="layui-input-block">
							<blockquote class="layui-elem-quote layui-quote-nm">
								{$invoice_info}
							</blockquote>
						</div>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">采购发票</label>
					<div class="layui-input-block">

						<blockquote class="layui-elem-quote layui-quote-nm">
							<div class="" style="margin-bottom: 30px;">
								{volist name="data['caigou_invoice_pz_info']" id="list"}
								<div style="padding-bottom: 5px;">{$i}.发票号：{$list.duty} <span class="invoice-link">
										<a href="{$list.save_path}" style="color: #ffffff;"
											title="{$list.file_name}" target="_blank"><i
												class="layui-icon layui-icon-link"></i>查看发票</a>
									</span></div>
								{/volist}
								<div>发票状态：[{if condition="$data['caigou_state'] EQ 1"}
									<span style="color: #009688;">审核通过</span>
									{elseif condition="$data['caigou_state'] EQ 2" /}
									<span style="color: #1E9FFF;">等待审核</span>
									{else /}<span style="color: #FF5722;">已驳回</span>{/if}]</div>
							</div>
							{if condition="$data['caigou_invoice_duty'] EQ '' OR $data['caigou_state'] != 1"}
							<div class="layui-form-item">
								<label class="layui-form-label">采购发票号</label>
								<div class="layui-input-inline">
									<input name="caigou_invoice_duty" id="caigou_invoice_duty" type="text" class="layui-input" />
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label"></label>
								<div class="layui-input-inline">
									<input type="hidden" name="caigou_invoice_pz" id="caigou_invoice_pz" />
									<button type="button" data-order_id="{$data.order_id}"
										class="layui-btn layui-btn-sm up_caigou_invoice"><i
											class="layui-icon layui-icon-upload"></i>选择发票</button>
											<button type="button" lay-filter="submit_caigou_invoice"
												class="layui-btn layui-btn-sm layui-btn-normal">提交发票信息</button>
									<span class=" up-view">
										
									</span>
								</div>
							</div>
							{/if}
							
						</blockquote>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">文档</label>
					<div class="layui-input-block">
						<blockquote class="layui-elem-quote layui-quote-nm">
							<div>
								<input type="hidden" name="caigou_hetong" id="caigou_hetong"
									value="{$data.caigou_hetong|default=''}" />
								<div style="margin-bottom: 10px;">
									　　销售合同：{if condition="$data.xsht EQ ''"}未生成{elseif condition="$data.xsht EQ '生成中'"
									/}生成中...{else /}<a href="{$data.xsht}" target="_blank"
										class="layui-btn layui-btn-warm layui-btn-sm "><i
											class="layui-icon layui-icon-download-circle"></i>销售合同</a>{/if}
								</div>
								<div style="margin-bottom: 10px;">
									　　采购合同：{if condition="$data.cght EQ ''"}未生成{elseif condition="$data.cght EQ '生成中'"
									/}生成中...{else /}<a href="{$data.cght}" target="_blank"
										class="layui-btn layui-btn-warm layui-btn-sm "><i
											class="layui-icon layui-icon-download-circle"></i>采购合同</a>
									<button type="button" class="layui-btn layui-btn-sm up_caigou_hetong"><i
											class="layui-icon layui-icon-upload"></i>上传采购合同</button>
									{if condition="$data.caigou_hetong >0"}
									<span class="invoice-link">
										<a href="{$data['caigou_hetong_info']['save_path']}" style="color: #ffffff;"
											title="{$data.caigou_hetong_info.file_name}" target="_blank"><i
												class="layui-icon layui-icon-link"></i>查看合同</a>
									</span>
									{/if}
								</div>
								{/if}
							</div>
							<div style="margin-bottom: 10px;">
								　　　送货单：{if condition="$data.shd EQ ''"}未生成{elseif condition="$data.shd EQ '生成中'"
								/}生成中...{else /}<a href="{$data.shd}" target="_blank"
									class="layui-btn layui-btn-warm layui-btn-sm "><i
										class="layui-icon layui-icon-download-circle"></i>送货单</a>{/if}
							</div>
							<div style="margin-bottom: 10px;">
								销售发票明细：{if condition="$data.xsfp EQ ''"}未生成{elseif condition="$data.xsfp EQ '生成中' OR
								$data.xsfp EQ '无发票明细'" /}{$data.xsfp}...{else /}<a href="{$data.xsfp}" target="_blank"
									class="layui-btn layui-btn-warm layui-btn-sm "><i
										class="layui-icon layui-icon-download-circle"></i>销售发票明细</a>{/if}
							</div>
							<div style="margin-bottom: 10px;">
								采购发票明细：{if condition="$data.cgfp EQ ''"}未生成{elseif condition="$data.cgfp EQ '生成中' OR
								$data.cgfp EQ '无发票明细'" /}{$data.cgfp}...{else /}<a href="{$data.cgfp}" target="_blank"
									class="layui-btn layui-btn-warm layui-btn-sm "><i
										class="layui-icon layui-icon-download-circle"></i>采购发票明细</a>{/if}
							</div>

						</blockquote>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">付款状态<br />（供货商）</label>
					<div class="layui-input-block">
						<blockquote class="layui-elem-quote layui-quote-nm">
							<div>
								{switch name="data['ghs_pay']"}
								{case value="1"}全部付款{/case}
								{case value="2"}质保金付款{/case}
								{case value="3"}部分付款{/case}
								{case value="4"}未付款{/case}
								{default /}未付款
								{/switch}
								{if condition="$data['ghs_intro'] NEQ ''"}
								<span style="padding-left: 10px;">备注：{$data.ghs_intro}</span>
								{/if}
							</div>
							{if condition="$data['pay_zhiyi'] NEQ ''"}
							<div style="color: #009688;padding-top: 10px;">
								质疑内容：{$data.pay_zhiyi}
							</div>
							{if condition="$data['pay_zhiyi_reback'] NEQ ''"}
							<div style="color: #5FB878;padding-top: 10px;">
								回复质疑：{$data.pay_zhiyi_reback}
							</div>
							{else /}
							<div style="margin-top: 10px;">
								<div class="layui-input-inline">
									<input type="text" name="pay_zhiyi_reback" placeholder="回复质疑内容"
										class="layui-input" />
								</div>
								<button type="button" class="layui-btn layui-btn-normal"
									lay-filter="pay_huifu_btn">回复质疑</button>
							</div>
							{/if}
							{/if}
						</blockquote>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">收款状态<br />（供货商）</label>
					<div class="layui-input-block">
						<blockquote class="layui-elem-quote layui-quote-nm">
							<div>
								<div class="layui-input-inline">
									<select name="shoukuan_pay">
										<option value="">收款状态</option>
										<option value="4" {if condition="$data['shoukuan_pay'] EQ 4" }selected="" {/if}>未收款</option>
										<option value="1" {if condition="$data['shoukuan_pay'] EQ 1" }selected="" {/if}>全部收款</option>
										<option value="2" {if condition="$data['shoukuan_pay'] EQ 2" }selected="" {/if}>质保金收款</option>
										<option value="3" {if condition="$data['shoukuan_pay'] EQ 3" }selected="" {/if}>部分收款</option>
										<option value="5" {if condition="$data['shoukuan_pay'] EQ 5" }selected="" {/if}>申请收款</option>
									</select>
								</div>
								<div class="layui-input-inline">
									<input type="text" name="shoukuan_intro" placeholder="收款说明"
										value="{$data.shoukuan_intro}" class="layui-input" />
								</div>
								<button type="button" class="layui-btn layui-btn-normal"
									lay-filter="shoukuan_pay_btn">确定</button>
							</div>
							{if condition="$data['shoukuan_zhiyi'] NEQ ''"}
							<div style="color: #009688;padding-top: 10px;">
								质疑内容：{$data.shoukuan_zhiyi}
							</div>
							{else /}
							<div style="margin-top: 10px;">
								<div class="layui-input-inline">
									<input type="text" name="shoukuan_zhiyi" placeholder="质疑内容" class="layui-input" />
								</div>
								<button type="button" class="layui-btn layui-btn-normal"
									lay-filter="shoukuan_zhiye_btn">质疑</button>
							</div>
							{/if}
							{if condition="$data['shoukuan_zhiyi_reback'] NEQ ''"}
							<div style="color: #5FB878;padding-top: 10px;">
								质疑回复：{$data.shoukuan_zhiyi_reback}
							</div>
							{/if}
						</blockquote>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">预计交货日期</label>
					<div class="layui-input-inline">
						<input name="delivery_date" lay-verify="required" type="text" readonly=""
							class="layui-input right-select" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">备注</label>
					<div class="layui-input-block" style="margin-left:115px">
						<textarea name="remark" class="layui-textarea">{$data.remark}</textarea>
					</div>
				</div>
				
				<div class="layui-form-item">
					<div class="layui-input-block">
						{if condition="$data['supplier_state'] NEQ 1"}
						<button type="button" class="layui-btn layui-btn-normal"
							lay-filter="zhiding_confirm">确认信息</button>
						{else /}
						{if condition="$data['order_state'] EQ 4 && $data['receipt_state'] EQ 2 &&
						$data['invoice_state'] EQ 2 && $data['pay_state'] EQ 2"}
						<button type="button" class="layui-btn layui-btn-normal" lay-filter="over_order">订单完成</button>
						{/if}
						{if condition="$data['order_state'] EQ 1"}
						<button type="button" class="layui-btn layui-btn-normal"
							lay-filter="confirm_order">确认订单</button>
						{/if}
						{if condition="$data['order_state'] EQ 1 OR $data['order_state'] EQ 2"}
						<button type="button" class="layui-btn layui-btn layui-btn-danger"
							lay-filter="cancel_order" style="display:none;">取消订单</button>
						{/if}
						{/if}
						<button type="button" id="close_page" class="layui-btn layui-btn-primary">关闭</button>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">订单日志</label>
					<div class="layui-input-block" style="margin-left:115px">
						<blockquote class="layui-elem-quote layui-quote-nm" style="height: 200px; overflow-y: auto;">
							<ul class="layui-timeline">
								{volist name="order_log" id="list"}
						  <li class="layui-timeline-item" style="padding-bottom: 0px;">
						 		<i class="layui-icon layui-timeline-axis">&#xe643;</i>
									<div class="layui-timeline-content layui-text">
										<h5 class="layui-timeline-title">
											{$list.create_time}【{$list.member_info.username}】 {$list.view_text}</h5>
									</div>
								</li>
								{/volist}
							</ul>
						</blockquote>
					</div>
				</div>
			</form>
		</div>
		<div id="select_goods" style="display: none; margin: 20px;">
			<div class="search-box">
				<form class="search_form layui-form" lay-filter="select_goods_search_form">
					<div class="layui-inline">
						<label class="layui-form-label">分类</label>
						<div class="layui-input-inline">
							<select name="category_sign1" id="category_search1" lay-verify="category_search1"
								lay-search>
							</select>
						</div>
						<div class="layui-input-inline">
							<select name="category_sign2" id="category_search2" lay-verify="category_search2"
								lay-search>
							</select>
						</div>
						<div class="layui-input-inline">
							<select name="category_sign3" id="category_search3" lay-verify="category_search3"
								lay-search>
							</select>
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">品牌</label>
						<div class="layui-input-inline">
							<select name="brand_sign" id="brand_sign" lay-verify="brand_sign" lay-search>
							</select>
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">商品编号</label>
						<div class="layui-input-inline">
							<input type="text" name="goods_sku" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">商品名称</label>
						<div class="layui-input-inline">
							<input type="text" name="goods_name" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">型号</label>
						<div class="layui-input-inline">
							<input type="text" name="goods_model" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="pack-up"></div>
				</form>

			</div>
			<table class="layui-hide" id="select_goods_list" lay-filter="select_goods_list"></table>
		</div>
		<div id="select_sale_attr" style="margin: 20px; display: none;">
			<form class="layui-form" lay-filter="tpl_select_sale_attr">
			</form>
		</div>
		<div id="supplier" style="margin: 40px 20px 60px 20px; display: none;">
			<form class="layui-form" lay-filter="tpl_supplier" action="{:url('order/saveSupplier')}">
				<input type="hidden" name="order_no" value="{$data.order_no}" />
				<div class="layui-form-item">
					<label class="layui-form-label">选择供应商</label>
					<div class="layui-input-inline" style="width: 200px;">
						<select name="supplier_id" lay-filter="supplier_id" lay-verify="required" lay-search>
							<option value="0" rate="0">请选择</option>
							{volist name="get_supplier" id="list"}
							<option value="{$list.member_id}" rate="{$list.supplier_rate}">{$list.supplier_name}
							</option>
							{/volist}
						</select>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">折扣率（%）</label>
					<div class="layui-input-inline">
						<input name="supplier_rate" id="supplier_rate" lay-verify="required" type="number"
							class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="button" class="layui-btn layui-btn-normal" lay-submit
							lay-filter="submit_supplier">确认供应商</button>
					</div>
				</div>
			</form>
		</div>
		<div id="express" style="margin: 40px 20px 60px 20px; display: none;">
			<form class="layui-form" lay-filter="tpl_express" action="{:url('order/editOrder')}">
				<input type="hidden" name="order_no" value="{$data.order_no}" />
				<input type="hidden" name="event" value="edit_fahuo_gys" />
				<div class="layui-form-item">
					<label class="layui-form-label">选择物流</label>
					<div class="layui-input-inline" style="width: 200px;">
						<input name="wuliu" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">物流单号</label>
					<div class="layui-input-inline">
						<input name="wuliudanhao" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="button" class="layui-btn layui-btn-normal" lay-submit
							lay-filter="submit_gysexpress">确认发货</button>
					</div>
				</div>
			</form>
		</div>
		<div id="add_install_info" style="margin: 40px 20px 60px 20px; display: none;">
			<form class="layui-form" lay-filter="tpl_add_install_info" action="{:url('Order/addInstallInfo')}">
				<input type="hidden" name="cart_id" />
				<input type="hidden" name="step" value="1" />
				<div class="layui-form-item">
					<label class="layui-form-label">安装地址</label>
					<div class="layui-input-inline">
						<input name="install_addr" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">安装时间</label>
					<div class="layui-input-inline">
						<input name="install_time" lay-verify="required" type="text" class="layui-input"
							autocomplete="off" readonly="" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">联系人</label>
					<div class="layui-input-inline">
						<input name="contact_man" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">联系电话</label>
					<div class="layui-input-inline">
						<input name="contact_phone" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="button" class="layui-btn layui-btn-normal" lay-submit
							lay-filter="submit_add_install">确认信息</button>
					</div>
				</div>
			</form>
		</div>
		<div id="add_install_engineer" style="margin: 40px 20px 60px 20px; display: none;">
			<form class="layui-form" lay-filter="tpl_add_install_engineer" action="{:url('Order/addInstallInfo')}">
				<input type="hidden" name="cart_id" />
				<input type="hidden" name="step" value="2" />
				<div class="layui-form-item">
					<label class="layui-form-label">工程师</label>
					<div class="layui-input-inline">
						<input name="engineer" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">工程师电话</label>
					<div class="layui-input-inline">
						<input name="engineer_phone" lay-verify="required" type="tel" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="button" class="layui-btn layui-btn-normal" lay-submit
							lay-filter="submit_add_engineer">指派工程师</button>
					</div>
				</div>
			</form>
		</div>
		<div id="add_pay_info" style="margin: 40px 20px 60px 20px; display: none;">
			<form class="layui-form" lay-filter="tpl_add_pay_info" action="{:url('Order/addPayInfo')}">
				<div class="layui-form-item">
					<label class="layui-form-label">支付渠道</label>
					<div class="layui-input-inline">
						<input name="pay_bank" lay-verify="required" type="text" class="layui-input"
							placeholder="支付宝、微信、中国银行、工商银行等" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">支付账号</label>
					<div class="layui-input-inline">
						<input name="pay_card" lay-verify="required" type="text" class="layui-input"
							placeholder="支付宝微信账号，银行卡号" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">支付户名</label>
					<div class="layui-input-inline">
						<input name="pay_card_name" lay-verify="required" type="text" class="layui-input"
							placeholder="支付账号开户姓名" />
					</div>
				</div>
				<div class="layui-form-item" style="display: none;">
					<label class="layui-form-label">支付单号</label>
					<div class="layui-input-inline">
						<input name="pay_no" type="text" class="layui-input" placeholder="银行、支付宝、微信交易流水" />
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="button" class="layui-btn layui-btn-normal" lay-submit
							lay-filter="submit_add_pay_info">确定支付</button>
					</div>
				</div>
			</form>
		</div>
		<div id="returned_box" style="margin: 40px 20px 60px 20px; display: none;">
			<form class="layui-form" lay-filter="tpl_returned" action="{:url('Order/returned')}">
				<input type="hidden" name="goods_sku" />
				<input type="hidden" name="cart_id" />
				<input type="hidden" name="order_no" value="{$data.order_no}" />
				<div class="layui-form-item">
					<label class="layui-form-label">退换货</label>
					<div class="layui-input-inline">
						<input type="radio" name="returned_type" value="1" title="退货" checked>
						<input type="radio" name="returned_type" value="2" title="换货">
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">回寄物流</label>
					<div class="layui-input-inline">
						<select name="back_express" lay-filter="back_express" lay-search>
							<option value="">请选择</option>
							<option value="shunfeng">顺丰速运</option>
							<option value="shentong">申通快递</option>
							<option value="yuantong">圆通速递</option>
							<option value="yundakuaiyun">韵达快运</option>
							<option value="zhongtong">中通快递</option>
							<option value="ems">EMS</option>
							<option value="jd">京东物流</option>
							<option value="baishikuaidi">百世快递</option>
							<option value="bsht">百事亨通</option>
							<option value="tiantian">天天快递</option>
							<option value="youzhengguonei">邮政快递包裹</option>
						</select>

					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">物流单号</label>
					<div class="layui-input-inline">
						<input name="back_express_no" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">退换货数量</label>
					<div class="layui-input-inline">
						<input type="number" name="returned_num" data-cart_num="1"
							lay-verify="required|number|gtzero|ltcart" value="1" class="layui-input"
							style="text-align: center; font-size: 18px; color:#ff6600; width: 80px; padding-right:15px">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">原因</label>
					<div class="layui-input-inline">
						<input name="returned_reason" type="text" class="layui-input" />
					</div>
				</div>


				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="button" class="layui-btn layui-btn-normal" lay-submit
							lay-filter="submit_returned">确认申请</button>
					</div>
				</div>
			</form>
		</div>
		<div id="shopping" style="margin: 20px; display: none;">
			<form class="layui-form" lay-filter="tpl_shopping" action="{:url('shopping/saveData')}">
				<input type="hidden" name="shopping_id" />
				<input type="hidden" name="member_id" />
				<div class="layui-form-item">
					<label class="layui-form-label">配送地址</label>
					<div class="layui-input-inline" style="width: 200px;">
						<select name="province" lay-filter="province" lay-verify="required" lay-search></select>
					</div>
					<div class="layui-input-inline" style="width: 200px;">
						<select name="city" lay-filter="city" lay-verify="required" lay-search></select>
					</div>
					<div class="layui-input-inline" style="width: 200px;">
						<select name="area" lay-filter="area" lay-verify="required" lay-search></select>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">详细地址</label>
					<div class="layui-input-inline" style="width: 500px;">
						<input type="text" name="street" lay-verify="required" placeholder="请输详细地址" autocomplete="off"
							class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">收货人</label>
					<div class="layui-input-inline">
						<input name="contacts" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">联系电话</label>
					<div class="layui-input-inline">
						<input name="phone" lay-verify="required|phone|number" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label"></label>
					<div class="layui-input-inline">
						<input name="is_default" type="checkbox" class="layui-input" title="默认收货地址" />
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="button" class="layui-btn layui-btn-normal" lay-submit
							lay-filter="submit_shopping">保存数据</button>
						<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>
			</form>
		</div>
		<script>
			var shopping_list_url = "{:url('shopping/ajaxList')}",
				shopping_find_url = "{:url('shopping/ajaxFind')}",
				goods_cols = {$goods_cols},
				goods_list_url = "{:url('Goods/ajaxList')}",
				select_goods_cols = {$select_goods_cols},
				select_goods_info = {$data.cart_info.json_data},
				default_date = "{$data.delivery_date}",
				order_no = "{$data.order_no}",
				order_edit_url = "{:url('Order/editOrder')}",
				invoice_info_json = {$data.invoice_info_json},
				remark_info = "{$data.remark}",
				order_state = "{$data.order_state}",
				depot_list_url = "{:url('Depot/ajaxList')}",
				depot_create_no_url = "{:url('Depot/createNo')}",
				shopping_state = "{$data.shopping_state}",
				save_alone_invoice_url = "{:url('Invoice/saveAloneInvoice')}",
				save_invoice_url = "{:url('Invoice/saveInvoice')}",
				category_select_uri = "{:url('Category/ajaxCategory')}",
				site_id = "{$site_id}",
				upload_uri = "{:url('Upload/uploadOne')}",
				paylog_view_url = "{:url('Paylog/views')}",
				brand_select_uri = "{:url('Brand/ajaxList')}",
				get_supplier = {$get_supplier_json},
				confirm_supplier = "{:url('order/confirmSupplier')}",
				gys_fh_state = "{$data.gys_fh_state}",
				gys_sh_state = "{$data.gys_sh_state}",
				caigou_invoice_duty = "{$data.caigou_invoice_duty}",
				caigou_invoice_pz = "{$data.caigou_invoice_pz}",
				down_saleht_url = "{:url('order/saleht',array('order_no'=>$data['order_no']))}";
		</script>
		<script type="text/html" id="goodsToolbar">
			<div class="layui-btn-container">
				{{# if(gys_fh_state == 2){ }}
					<a type="button" data-id="shopping_goods" data-title="设置发货状态"
						class="layui-btn layui-btn-normal layui-btn-sm tap-nav" lay-event="fahuoGys"><i
							class="layui-icon layui-icon-release"></i>设置发货状态</a>
				{{# }else { }}
				<div class="layui-form-label" style="text-align: left; color: #FF6600;font-size: 14px;width:auto">已发货（{$data.wuliu}【{$data.wuliudanhao}】）</div>
					{{# if(gys_sh_state == 2){ }}
					<a type="button" data-id="shopping_goods" data-title="收货"
						class="layui-btn layui-btn-normal layui-btn-sm tap-nav" lay-event="shouhuoGys"><i
							class="layui-icon layui-icon-release"></i>设置收货状态</a>
					{{# } else { }}
					<div class="layui-form-label" style="text-align: left; color: #FF6600;font-size: 14px;">已收货</div>
					{{# } }}
				{{# } }}
					
			</div>
		</script>
		<script type="text/html" id="goods_tool">
			<div class="layui-btn-group">
				<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="remove" data-title="移除"><i
						class="layui-icon layui-icon-close"></i></a>
			</div>
		</script>
		<script type="text/html" id="select_goods_tool">
			<div class="layui-btn-group">
				<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="select" data-title="选择"><i
						class="layui-icon layui-icon-circle"></i></a>
			</div>
		</script>
		<script type="text/html" id="returned_tool">
			<div class="layui-btn-group">
				<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="returned" data-title="申请退换货">申请退换货</a>
			</div>
		</script>
		<script type="text/html" id="goods_pictureTpl">
		{{# if(d.goods_picture){
				return '<img src="'+d.goods_picture.save_path+'" />';
				}
		}}
		</script>
		<script type="text/html" id="sale_attrTpl">
		{{#
				if(d.sale_attr == undefined || d.sale_attr.length == 0){
					return '<span>默认属性</span>';
				} else {
					return '<span class="right-select select-sale-attr">请选择</span>';
				}
			}}
		</script>
		<script src="/static/js/order/detail.js" type="text/javascript" charset="utf-8"></script>
	</body>
</html>
